import request from '@/utils/request';

// 新增文章
interface addArticleParams {
  content: string
  wztp: Array<string>
  className: string
  tatle: string
}

// 审核
interface examineApi {
  uid: number | string
}

// 文章列表
interface articleList {
  page: number | string
  size: number | string
  tatle?:  string
  className?:  string
  time?: string
}
// 新增文章
export const addArticleApi = (data:addArticleParams) => request<{
  data: string
}>({
  url: '/zh/ption/release',
  method: 'post',
  data
})

// 获取文章数据
export const articleListApi = (data: articleList) => request<{
  data: any
}>({
  url: '/main/query/obtain2',
  params: {...data}
})

// 审核
export const examineApi = (data:any) => request<{
  data: string
}>({
  url: '/zh/side/sh',
  method: 'post',
  data
})

// 删除
export const delArticleApi = (data:any) => request<{
  data: string
}>({
  url: '/zh/side/delete',
  method: 'post',
  data
})
